﻿function km_databind(tb, data) {
    tb.find("tr").each(function () {
        $(this).remove();
    });
    $.each(data.rows, function (i, row) {
        var nr = "<tr target='key_id' rel='" + row.id + "'>";
        for (idx = 0; idx < row.cell.length; idx++) {
            nr = nr + "<td>" + row.cell[idx] + "</td>";
        };
        nr = nr + "</tr>";
        tb.append(nr);
    });
}